package com.cjh.mybatis03.session.defaults;

import com.cjh.mybatis03.session.Configuration;
import com.cjh.mybatis03.session.SqlSession;
import com.cjh.mybatis03.session.SqlSessionFactory;
import lombok.AllArgsConstructor;

/**
 * @Descripton
 * @Author cjh
 * @Date 2023/5/24 15:12
 */
@AllArgsConstructor
public class DefaultSqlSessionFactory implements SqlSessionFactory {

    private final Configuration configuration;


    @Override
    public SqlSession openSession() {
        return new DefaultSqlSession(configuration);
    }
}
